<?php
function smarty_function_html_breadcrumb($rP, &$smarty)
{
	if (!is_array($rP['from'])) { return ''; }
	$rLinks = array();
	foreach ($rP['from'] as $rLink) {
		$sHref = $rLink['link'] ? $rLink['link'] : 'javascript:void(0);';
		$sTarget = $rLink['link'] && $rP['target'] ? ' target="'.$rP['target'].'"' : '';
		$sClass = $rP['class'] ? ' class="'.$rP['class'].'"' : '';
		/// html ///
		$rLinks[] = '<a href="'.$sHref.'" title="'.htmlspecialchars($rLink['title']).'"'.$sClass.$sTarget.'>'.htmlspecialchars($rLink['title']).'</a>';
	}
	$sGap = isset($rP['gap']) ? $rP['gap'] : ' &gt; ';
	return implode($sGap, $rLinks);
}
?>
